package com.shutuo.callnummeiwei.global;

import android.content.Context;

import com.instwall.net.NetCore;


public class NetLib {
    private static NetLib instance = null;
    public static NetCore netCore;
    public static Context mContext;


    private NetLib() {
    }

    public static NetLib getInstance() {
        if (instance == null) {
            synchronized (NetLib.class) {
                if (instance == null) {
                    instance = new NetLib();
                }
            }
        }
        return instance;
    }

    public void init(Context context) {
        if (context == null) {
            throw new NullPointerException("context is null");
        }
        mContext = context;
        netCore = NetCore.get();
        OkHttpHelper.initOkHttpClient();
    }

}
